package com.xiaoxu.rental.controller;

import cn.hutool.core.util.StrUtil;
import com.xiaoxu.rental.entity.User;
import com.xiaoxu.rental.service.OssService;
import com.xiaoxu.rental.util.Result;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.Objects;

/**
 * @Title: OSSController
 * @Author Mr.Xu
 * @Package com.xiaoxu.rental.controller
 * @Date 2024/7/30 16:17
 * @description:
 */
@RestController
@RequestMapping("/rental/oss")
@SuppressWarnings("all")
public class OSSController {
    @Resource
    private OssService ossService;
    @PostMapping("/upload")
    public Result upload(MultipartFile file){
        return Result.success(ossService.upload(file));
    }





}
